/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
 */

import { TaskDetails } from '@ohos/hvigor';

import { CompileModeEnum } from '../../enum/compile-mode-enum.js';
import { TargetTaskService } from '../service/target-task-service.js';
import { OhosModuleTask } from './ohos-module-task.js';

/**
 * openHarmony基础hap 的task
 *
 * @since 2022/1/5
 */
export abstract class OhosHapTask extends OhosModuleTask {
  protected readonly targetCompileMode: CompileModeEnum;

  protected constructor(targetService: TargetTaskService, taskDetails: TaskDetails) {
    super(targetService, taskDetails);
    this.targetCompileMode = this.moduleModel.getCompileMode(targetService.getTargetData().getProduct());
  }
}
